﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CollisionTracker : MonoBehaviour {

    public static CollisionTracker Instance;
    public bool isSunReady = false;
    public bool isCloudReady = false;
    public bool stormMove = false;

    private void Start()
    {
        Instance = this;
    }

    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.gameObject.name=="Sun")
        {
            Debug.Log("晴天");
            isSunReady = true;
        }
        //else if (collision.gameObject.name == "Storm")
        //{
        //    Debug.Log("龙卷风");
        //    stormMove = false;
        //    isSunReady = true;
        //}
    }
    private void OnTriggerExit2D(Collider2D collision)
    {
        Debug.Log(collision.gameObject.name);
        isSunReady = false;
        //isCloudReady = false;
        //移除了沙尘暴
        if (collision.gameObject.name=="StormReplace")
        {
            stormMove = true;
        }
    }
}
